/*

Author   : chaos

FileName : access_control.cpp

Date     : 11/08/17 17:08:20

*/
#include <iostream>
#include <cstring>
using namespace std;

class Reader
{
    private:
        char name[10];

    public:
        long index;

        char * get_name(){ return name; }
        void set_name(char *i_name);
};

void Reader::set_name(char * i_name)
{
    strcpy(name,i_name);
}

int main(int argc ,char *argv[])
{
    Reader A_Reader;
    char name[10];

    cout << "Please input your name ?";
    cin >> name;

    A_Reader.index = 1;

    A_Reader.set_name(name);

    cout << "Your name is ";
    cout << A_Reader.get_name();

    cout << " .( index " << A_Reader.index;

    cout <<")" << endl;
    return 0;
}
